<?php
//设置cookie
//setcookie("user", "Alex Porter", time()+3600);
// set the expiration date to one hour ago
setcookie("user", "", time()-3600);
?>

<html>
<body>
<?php
if (isset($_COOKIE["user"]))
    echo "Welcome " . $_COOKIE["user"] . "!<br />";
else
    echo "Welcome guest!<br/>";
?>
</body>
</html>
